package com.manage.biz;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

import com.manage.dao.resultSetDb;
import com.manage.domain.task;

public class myTask {
public List<task> newMyTask(String EMPID)throws Exception{
	
	resultSetDb rsd=new resultSetDb();
	ResultSet rs=rsd.taskGet(EMPID);
	List<task>list=new ArrayList<task>();
	while(rs.next()){
		task empTask=new task();
		empTask.setENDDATE(rs.getDate("ENDDATE").toString());
		empTask.setFILENAME(rs.getString("FILENAME"));
		empTask.setMANAGERNAME(rs.getString("MANAGERNAME"));
		empTask.setSTARTDATE(rs.getDate("STARTDATE").toString());
		empTask.setTASKDETAILS(rs.getString("TASKDETAILS"));
		empTask.setTASKFROM(rs.getString("TASKFROM"));
		empTask.setTASKID(rs.getString("TASKID"));
		empTask.setTASKLEVEL(rs.getString("TASKLEVEL"));
		empTask.setTASKNAME(rs.getString("TASKNAME"));
		if(rs.getString("TASKSTATE").equals("unstarted"))
		empTask.setTASKSTATE(rs.getString("TASKSTATE"));
		list.add(empTask);
	}
	return list;
}
}
